home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / SCRIPTZ / IDLE.ZIP / OKEYIDLE.TXT < prev    next >
Text File  |  1996-05-25  |  15KB  |  332 lines

  1.         OkeyDokey's IdleWatcher (v1.3)
  2.  
  3.  
  4. Feel free to share this script with others, provided you only
  5. distribute the unedited and complete idlekick.zip file.
  6.  
  7.  
  8. INTRODUCTION
  9.  
  10. This is an idle monitor/kick for mIRC 4.1. It is designed for channel
  11. ops. You should have experience with and a keen interest in mIRC's
  12. remote to comfortably understand, install, and use IdleWatcher.
  13.  
  14. IdleWatcher can monitor for idling, either channel-wide, or on
  15. selected users. When the idle time limit is reached, IdleWatcher can
  16. either give you (or all chanops) a message, or kick the idling user.
  17. IdleWatcher can check for idling once, or on a continuous basis.
  18.  
  19. I wrote this from scratch after wondering how/whether an idle kick
  20. would work in mIRC. A few enquiries had come up empty-handed. Idle
  21. (:▐) curiosity turned into something of an obsession with mIRC's
  22. configurablity- I just knew that it could be made to work! This rather
  23. elaborate solution to a simple but specialized need is the result.
  24. Having fun while learning more about mIRC's remote was the motivation
  25. and value for me.
  26.  
  27. If you decide to use IdleWatcher, read this file and install.txt
  28. carefully! This is a somewhat complex script. It has an automatic kick
  29. function, and the script *must* be installed as directed to integrate
  30. properly into your events section. 
  31.  
  32.  
  33. FILES INCLUDED
  34.  
  35. readme.txt    A few obvious and unnecessary comments.
  36. descript.txt    A description of IdleWatcher.
  37. okeyidle.txt    This file explaining IdleWatcher.
  38. install.txt     Installation instructions. Read carefully!
  39. grpreadr.txt    The IdleWatcher status (group) reader.
  40. iwscript.txt    The IdleWatcher script components.
  41. idletmr.log     The file in which the nick-timer pairs are held.
  42. idlelog.txt     The log file for IdleWatcher.
  43. idletag.cmd    The command file for IdleTag.
  44. idleqhlp.ply    Three files used by the help functions. 
  45. idlethlp.ply
  46. idlerhlp.ply
  47.  
  48.  
  49. IDLEWATCHER FEATURES
  50.  
  51. *Automatic: assigns, tracks, executes, and clears timers automatically
  52.  
  53. *Configureable: use monitor mode or kick mode; watch entire channel or
  54. just selected user(s); check for idling once, or continuously.
  55.  
  56. *Comprehensive set of menu bar and popup commands
  57.  
  58. *Good feedback on status/settings/actions; includes command group
  59. reader; will advise other channel ops if desired.
  60.  
  61. *Logging and help functions.
  62.  
  63. *Ctcp access: you can allow access by your op level users to basic
  64. IdleWatcher information and function through your remote; set of ctcp
  65. commands included.
  66.  
  67. *Compatible: If properly installed will not interfere with other event
  68. triggered commands in your remote. Can be active at the same time as
  69. flood protection, word kicks, file offering, and other ON TEXT events.
  70.  
  71. *Can be used on more than one channel simultaneously
  72.  
  73.  
  74. WHY AN IDLEKICK?
  75.  
  76. There are a number of reasons why an idlekick might be desireable: you
  77. may simply want your client's remote to be very capable in channel
  78. management; you too are irritated by those users who join your channel
  79. while on 9 others and/or simply 'squat' without paying attention or
  80. uttering a word; active participation might be expected or required on
  81. your channel; for the conscientious op it could identify shy newbies
  82. who might need only a gentle prompt to jump in and participate; you
  83. are concerned about lurking spybots/clonebots/split-lookers
  84. (DeathWishGangstaKillerPlatinum v13.7?); and so forth.
  85.  
  86.  
  87. HOW DOES IT WORK?
  88.  
  89. Idling is a 'negative event', it happens when nothing happens! That
  90. makes an idlekick script a bit unusual, and though simple in concept a
  91. challenge to write (anyone who has tried will sympathize!). In the
  92. case of IdleWatcher, when the idle monitoring is initiated, a unique
  93. timer is assigned to the nick being monitored. If the nick does
  94. anything in the channel before the idle time limit is up, the timer is
  95. identified and cancelled. If the nick does nothing, the timer 'limits
  96. out' and executes a command 'announcing' that the nick has been idle.
  97. Something else may then happen (any guesses?).
  98.  
  99.  
  100. THE IDLEWATCHER SCRIPT (key points)
  101.  
  102. Uses custom 'command' definition and redirection in the events remote.
  103. Channel-wide monitoring is through the remote's ON JOIN line(s).
  104. A unique idle timer is assigned to each monitored nick (TIMERSTART).
  105. Timer number and duration are controlled by variables.
  106. The assigned nick-timer pair is written to file (TIMERLOG).
  107. The next available timer number is incremented (using BUMPTIMER).
  108. Individual nicks are tagged for monitoring by a $read command file.
  109. All event triggers (any visible activity by the IdleWatched nick) cancel
  110. that user's idle timer.
  111. Completing timers notify you and/or other chanops with a message.
  112. If IdleGuard is activated, timers are reset after any activity.
  113. If IdleKick is activated, the message triggers a kick. 
  114. All idle messages/kicks are logged.
  115. Positioning and duplication in the events section ensure other event
  116. lines can function while idle monitoring is active (eg. flood
  117. protection, word kicks, file offering).
  118.  
  119.  
  120. POPUP/MENU COMMANDS
  121.  
  122. *IdleMonitor: The main 'on/off' switch for IdleWatcher, IdleMonitor
  123. watches ALL users joining the channel, and gives you a message if the
  124. idle limit is exceeded.
  125.  
  126. *IdleKick: If the idle limit is exceeded by any IdleWatched user, KICKS
  127. the user. 
  128.  
  129. *IdleTag: Tags the SELECTED user for IdleWatching. You can select up
  130. to 3 names at a time.
  131.  
  132. *IdleGuard: RESETS timers providing CONSTANT IdleWatching. 
  133.  
  134. *IdleOpNotice: Sends any other ops on the channel IdleWatcher notices.
  135.  
  136. *IdleCtcp: Makes some IdleWatcher commands available through your
  137. remote to op level users. 
  138.  
  139. *IdleWatcher Status: Displays current IdleWatcher configuration, idle
  140. time limit, and monitored users. 
  141.  
  142. *Time Limit: Shows or sets idle time limit, in seconds. (%iwlimit)
  143.  
  144. *Clear IdleWatcher: Halts all IdleWatching. Clears ALL active timers,
  145. and the IW user level. Disables all IW command groups.
  146.  
  147. Other commands, all pretty well self-explanatory: *List Users; *Clear
  148. Level; *Flush Level; *Show All Timers; *Cancel Timer; *Cancel ALL
  149. Timers; *Open IdleWatcher Log; *Open NickTimer Log; *Quick Help;
  150. *Topic Help.
  151.  
  152. You can use Topic Help online for explanation of any menu command.
  153.  
  154.  
  155. REMOTE CTCP COMMANDS
  156.  
  157. IW STATUS, IW HELP, IW GETLOG are the basic ctcp commands always
  158. available to your op level users. If you have IdleCtcp switched on, IW
  159. OPNOTICEON, IW OPNOTICEOFF, IW CHANNELON, IW CHANNELOFF and IW USER
  160. are made available to your op level users. For stand-alone use in a
  161. channel management role, the IdleKick function is available at 'your'
  162. access level. You may choose to adjust what functions are externally
  163. available to your op level users. See the online Topic Help for more
  164. on the individual ctcp's.
  165.  
  166.  
  167. USING IDLEWATCHER:
  168.  
  169. You can leave IdleMonitor switched on at all times. It will monitor
  170. all users joining the channel for idling, once, and message you
  171. whenever the idle time limit is exceeded. It will remain on between
  172. sessions, until you select IdleMonitor Off or Clear IdleWatcher.
  173.  
  174. IdleKick and IdleGuard work on completing timers. They can be switched
  175. on or off at any time, and all subsequent timer expiries will be
  176. affected accordingly,
  177.  
  178. Select IdleWatcher Status to confirm its current configuration, and to
  179. check who is currently being monitored.
  180.  
  181. At any time you can tag a selected user for monitoring with IdleTag,
  182. independently of the IdleMonitor setting. The user tagged would be
  183. subject to IdleKick and IdleGuard if they are switched on. You can
  184. select up to 3 nicks at once, and even tag all the users on the
  185. channel when you first join if you wish.
  186.  
  187. Sound complicated? It's not, really- the commands just mentioned are
  188. the core ones. Play with all the menu commands (careful with IdleKick
  189. if you are opping on a channel!), and it will quickly become clear.
  190. Feedback when you use IdleWatcher is good. You can click on Quick Help
  191. for a brief review of the core commands, and Topic Help for more on
  192. any given menu command.
  193.  
  194. Decide on an appropriate idle time limit for your purposes. The script
  195. comes with a 20 minute setting; you can reset it from the menu/popup
  196. (Time Limit). The setting is entered and displayed in seconds. The
  197. current variable setting is used when the timer is started, and for
  198. all channels monitored. When you change it, only new timers are
  199. affected. If you want to change the duration of running idle timers,
  200. you will need to cancel them (Cancel Timer), and retag the users. You
  201. can change the kick message under the IdleKick command.
  202.  
  203. Shutting off IdleWatcher: 'Clear IdleWatcher' completely resets all
  204. IdleWatcher functions, disables all IW command groups, clears the IW
  205. user level, and stops *all* timers. Very thorough, and effective.
  206. Unfortunately, mIRC does not allow shutting off groups of timers; you
  207. can either cancel them individually, or all together. If you have any
  208. other 'critical' timers running, you will not want to use Clear
  209. IdleWatcher. Instead, switch off any active IW functions (do
  210. 'IdleWatcher Status' if you're unsure what you have on!). Then you can
  211. either just let the running timers run their course (no big deal if
  212. IdleKick and IdleOpNotice are off; no one will be bothered), or you
  213. can select Cancel Timer and stop any active IdleWatcher timers
  214. individually (really quite easy to do).
  215.  
  216.  
  217. A CAUTION: 
  218.  
  219. If you part a channel for whatever reason, someone on whom you have an
  220. idle timer running may have been active, and so their timer would have
  221. been cleared had you not been absent. You really shouldn't use
  222. IdleKick if you have been absent from the channel, unless you are
  223. confident the user would have been inactive while you were gone.
  224.  
  225. [The script does come with a 'switch' in an ON JOIN line at your
  226. access level for your 'prime' channel, within the IdleMonitor command
  227. group, and is active only when you have IdleMonitor switched on.
  228. IdleKick will be switched off when you join your 'prime' channel, and
  229. you'll receive a reminder to check any active timers.]
  230.  
  231. Whenever you leave the channel, you will also miss any parts or quits
  232. that occurred while you were gone. When you return, the monitored
  233. users will no longer be there, but you will have active timers running
  234. on them! Best to start fresh when you return to a channel after leaving.
  235.  
  236. NOTE ON IDLEKICK:
  237.  
  238. IdleKick affects completing timers; you can switch it on or off at any
  239. time, and all current and new timers will be affected accordingly
  240. (likewise with IdleGuard). IdleKick is not selective on user; it
  241. applies to all completing timers (again, as with IdleGuard). Kicks are
  242. accompanied by a 30 second temporary ban to foil auto-rejoin.
  243.  
  244.  
  245. NOTE ON IDLEGUARD: 
  246.  
  247. When switched on IdleGuard resets IdleWatcher timers whenever the
  248. users being watched say or do anything. On a busy channel(s) this will
  249. generate a lot of processing, and may affect performance on slower
  250. computers (when tested on a 386sx and active on two busy channels, it
  251. was noticeable but not really a problem).
  252.  
  253. By maintaining the monitored user at IdleWatcher level, IdleGuard when
  254. active will 'block' monitored users from channel flood protection
  255. lines subsequent to the first line (which you will have duplicated at
  256. IW user level as install.txt instructs). Ctcp flood protection remains
  257. fully functional (when duplicated with the correct access level, of
  258. course). When installed as directed, IdleWatcher is perfectly
  259. compatible with channel flood protection if IdleGuard is not on. You
  260. may not want to use IdleGuard in situations where flood protection is
  261. important to you. (But then, if you feel the need to use IdleGuard,
  262. flooding behavior is probably unlikely!)
  263.  
  264.  
  265. TIPS, HINTS, MISCELLANEOUS NOTES
  266.  
  267. You STATUS WINDOW will be significantly busier when operating
  268. IdleWatcher, especially if you use IdleGuard on a busy channel. You
  269. may want to go into mIRC's Options/Extras and remove the line
  270. separator.
  271.  
  272. IdleWatcher Status reports: if you use any method other than the
  273. IdleWatcher menu or alias commands to enable/disable IdleWatcher
  274. command groups (eg. direct editing in the remote or *.ini files, or
  275. using /enable or /disable in the edit box), the IdleWatcher group
  276. reader will not be updated, and you may get then get inaccurate
  277. IdleWatcher status/configuration reports.
  278.  
  279. If you IdleTag a user who is already being IdleWatched, a second
  280. additional timer will be started, and the first timer will continue
  281. and limit out unless you cancel it manually. If you want to ensure
  282. everyone in a channel is monitored, join the channel with IdleMonitor
  283. off, go down the names list IdleTagging everyone, then turn on
  284. IdleMonitor. This way you'll avoid duplicating timers.
  285.  
  286. If you are a keyboard kinda guy/gal, review the IdleWatcher aliases;
  287. everything the menu/popups do can be done using the edit box. (the
  288. popup command definitions are all alias based)
  289.  
  290. Remote functionality: If you want to enhance IdleWatcher remote
  291. functionality, consider adding other ctcp commands at your/op access
  292. level (eg, IdleGuard, IdleKick, idle time limit).
  293.  
  294. A monitored user who does nothing in the channel while sending private
  295. messages to a user other than yourself will be seen as idle, and
  296. treated as such.
  297.  
  298. The best method for IdleWatcher to announce idle users seemed to be a
  299. /msg $me. It does result in duplicate lines if your query window is
  300. open. Not as tidy as I'd like, but useful as a trigger for other
  301. IdleWatcher functions, whereas /echo could not be. For status reports
  302. and command feedback, /echo is used extensively, but I used no color
  303. switches. If you want to brighten things up, just use your text editor
  304. (when mIRC is inactive) to insert the /echo color numbers you prefer. 
  305.  
  306. The ON KICK: Whenever an IdleWatched user is kicked, the script will
  307. do an /ruser, and $read the /timer off line for that user from the
  308. timer log file. If the kick is an IdleWatcher kick the /ruser and
  309. $read will already have been executed, and you will see a second
  310. attempt in the status window to remove the user level and stop the
  311. timer.
  312.  
  313.  
  314. I do hope you find IdleWatcher a useful and enjoyable addition to your
  315. mIRC remote (and perhaps even the source of one or two new ideas you
  316. can use!) I welcome any comments on this script. I may be found opping
  317. on DALnet #mIRC, or emailed at okeydoke@freenet.edmonton.ab.ca. (Drop
  318. me a line if you decide to use IdleWatcher, and I'll advise you of any
  319. updates.)
  320.  
  321.  
  322. Happy IRCing!
  323. OkeyDokey
  324.  
  325.  
  326. 5/25/96
  327.  
  328. I've written two other scripts that you may find useful in your chanop
  329. duties. CloneBan, an effective channel clone protection script; and
  330. WhoisLog, a /whois capture script, with a number of functions that
  331. automatically respond to /whois information. Both will be released
  332. shortly.